

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>设置我的资料</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <!--引入本地的css样式-->
    <link rel="stylesheet" href="../../../static/layui/css/layui.css" media="all">
    <!--<link rel="stylesheet" href="../../../static/css/admin.css" media="all">-->

</head>
<body>

<form id="myform" class="layui-form" lay-filter="myform" id="layuiadmin-form-admin" style="padding: 20px 30px 0 0;">

                    <div class="layui-form-item">
                        <label class="layui-form-label">员工姓名:</label>
                        <div class="layui-input-inline">
                            <input type="text" name="username" lay-verify="username" autocomplete="off" class="layui-input">
                        </div><br>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">员工编号:</label>
                        <div class="layui-input-inline">
                            <input type="text" name="name_num" lay-verify="name_num" autocomplete="off" class="layui-input">
                        </div><br>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">原始密码:</label>
                        <div class="layui-input-inline">
                            <input type="password" name="oldpassword" lay-verify="oldpass" autocomplete="off" class="layui-input">
                        </div>
                    </div>



                    <div class="layui-form-item">
                        <label class="layui-form-label">新密码:</label>
                        <div class="layui-input-inline">
                            <input type="password" name="password" lay-verify="pass" autocomplete="off" class="layui-input">
                        </div><br>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">确认密码:</label>
                        <div class="layui-input-inline">
                            <input type="password" name="repassword" lay-verify="repass" autocomplete="off" class="layui-input">
                        </div>

                    </div>


</form>
<script type="text/javascript" src="../../../static/js/jquery-3.6.0.min.js"></script>
<!--引入本地layui.js-->
<script src="../../../static/layui/layui.js"></script>
<script type="text/html" id="statusTpl">
    {{#  if(d.status == 1){ }}
    <span>启用</span>
    {{#  } else if(d.status == 2){ }}
    <span>禁用</span>
    {{#  } }}
</script>
<script type="text/javascript">
    layui.use(['form', 'layedit', 'laydate','upload','element'], function() {
        var form = layui.form
            , layer = layui.layer
            ,upload = layui.upload
            ,element = layui.element
            , layedit = layui.layedit
            , laydate = layui.laydate;

        //json字符串
        var obj = sessionStorage.getItem("user");
        if(obj != null){
            //将json字符串转换为普通js对象，目的：js对象，可以直接打点调用取值
            var user = JSON.parse(obj);
            //页面加载，就应该去sessionStorage获取登录成功账户的信息，塞入到对应编辑输入框
            form.val('myform', {
                "name_num":user.name_num
                ,"username":user.username

            });
        }
    });
</script>

<script>

</script>

</body>
</html>